using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Easily._02_Form.KimiAI
{
    public partial class APIKeyForm : Form
    {
        public APIKeyForm()
        {
            InitializeComponent();
        }

        private void getKimiAPIKey_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            System.Diagnostics.Process.Start("https://platform.moonshot.cn/console/api-keys");
        }

        private void setKimiAPIKey_btn_Click(object sender, EventArgs e)
        {
            string apiKey = userAPIKeyInput.Text.Trim();
            if (apiKey == "")
            {
                MessageBox.Show("请输入KimiAI API Key！");
                return;
            }
            Globaldefine.KimiAPIKey = apiKey;
            MessageBox.Show("设置成功！");
            this.Close();
        }
    }
}
